#ifndef __motor_H
#define __motor_H
#include "main.h"
////#include "mpu6050.h"
//#include "DMP_test.h"
 
#include "math.h"

extern float Aima_v, Aimb_v;

extern short i,V_A,V_B,g_nMotorPulse,g_nMotor2Pulse;


void StepMotor_SetSpeedAndDir(
    TIM_HandleTypeDef *htim,
    uint32_t channel,
    uint16_t dir_Pin,
    int32_t speed_Hz);


void turn_control(
    float current_yaw, float gyro_z,
    float target_yaw, int forward_speed,
    int *left_wheel_output, int *right_wheel_output);


#endif
